package com.example.model;

public class Man  extends  People{

    /**
     * 构造函数，默认构造函数
     */
    public  Man()
    {

    }

    /**
     * 重构的构造函数 ， 构造方法的重载；
     * @param name
     */
    public Man(String name)
    {
        this.name=name;

    }

    public Man(String id,String name)
    {
        this.id=id;
        this.name=name;

    }


    @Override
    public void sleep() {
        System.out.println("id:"+this.id+ ",name:" +this.name+  " is sleeping.");
    }
}
